package com.example.fragmentyeni;

import android.app.Fragment;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class FragmentB extends Fragment {

		TextView textView;
		View v;
		@Override
		public View onCreateView(LayoutInflater inflater, ViewGroup container,
				Bundle savedInstanceState) {
			v = inflater.inflate(R.layout.fragment_layout_b, container, false);
			textView = (TextView) v.findViewById(R.id.textView1);
			
			return v; 
		}
		public void changeData(int index){
			Resources resources = getResources();
			String[] description=resources.getStringArray(R.array.description);
			textView.setText(description[index]);
			
		}
}
